home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: ODF Extension bug?
- Sent: 9/11/96 1:27 PM
- Received: 9/11/96 1:27 PM
- From: Greg Friedman <friedman@cognosis.com>
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List
-
-
- Erlend.Stav@informatics.sintef.no wrote:
- > I have had some probl. related to ODF´s extension mngr during release
- >(document closedown), and wonder if it might be a bug in ODF.
- >
- > I have traced the problem down to the following :
- > - the SOMPart first deletes the ext. mngr, then the FWPart
- > - the FWPart still has a pointer to the (now invalid) ext. mngr
- > - my FWPart (subclass) member variable triggers a ReleaseExtension
- > - ReleaseExtension tries to access the non-null, but invalid ext. mngr
- >
- > A workaround that seems to work is to do PrivSetExtensionManager(NULL) as
- >the first thing in my FWParts destructor.
- >
- > Could someone confirm this to be a bug, or am I doing something wrong?
-
- I looked at the code and I agree that it shouldn't work this way. The SOM
- part macro should just delete the FW_CPart. FW_CPart's destructor should
- destroy the extension manager. It is too late to get this fix into R2, but
- it will get rolled into R3.
-
- If I understand the fix you describe above, you are preventing a crash, but
- you are creating a memory leak.
-
- Why does your part have to keep a reference to your extension? A reasonable
- interim fix might be to eliminate the need to keep a reference to your
- extension. If your part needs to get to your extension, you can always call
- FW_CExtensionManager::AcquireExtensionManager. You can use the
- allowCreation parameter to control whether or not your part's call to
- AcquireExtensionManager should cause the extension to be instantiated.
-
- Greg.
-
-
- ........................................................................
- Greg Friedman friedman@apple.com
- Apple Computer, Inc. OpenDoc(tm) Development Framework
- ........................................................................